package com.frank.updateHeader.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 小石潭记
 * @date 2020/11/3 10:01
 * @Description: ${todo}
 */
@RestController
@RequestMapping("/update-header")
public class UpdateHeaderController {

    @GetMapping("/index")
    public String index(@RequestHeader("code") String code,
                        @RequestHeader("name") String name) {
        return "name:" + name + "  code:" + code;
    }

    @GetMapping("/index2")
    public String index2(@RequestHeader("code") String code,
                        @RequestHeader("name") String name) {
        return "name2:" + name + "  code2:" + code;
    }

}
